package org.spark.example

import org.apache.spark.{SparkConf, SparkContext}

/**
  * @Author: chengjj
  * @Date: 2020-09-08
  */
object SparkTest {
    def main(args: Array[String]): Unit = {
        val conf = new SparkConf();
        conf.setAppName("test").setMaster("local");
        val sc = new SparkContext(conf);
        val rdd = sc.makeRDD(1 to 500, 3);
        val rdd1 = rdd.sortBy(x => x);
        rdd1.foreach(x => print(","+x))
    }
}
